#!/bin/bash

set -eux
### --start_docs

## * Source in the undercloud credentials.
## ::

source {{ working_dir }}/stackrc

{% if download_overcloud_image|bool %}
{% include 'download-overcloud-image.sh.j2' %}
{% endif %}
{% if step_overcloud_image|bool %}
{% include 'overcloud-image-upload.sh.j2' %}
{% endif %}
{% if step_glance_upload|bool %}
{% include 'overcloud-glance-image-upload.sh.j2' %}
{% endif %}
{% if undercloud_enable_nova|bool %}
{% include 'overcloud-list-flavors.sh.j2' %}
{% endif %}
{% if step_register|bool %}
{% include 'overcloud-import-nodes.sh.j2' %}
{% endif %}
{% if step_root_device_size|bool %}
{% include 'root-device-size.sh.j2' %}
{% endif %}
{% if step_root_device_hints|bool %}
{% include 'root-device-hints.sh.j2' %}
{% endif %}
{% if step_introspect|bool %}
{% include 'overcloud-introspect.sh.j2' %}
{% endif %}
{% if release not in ['newton', 'ocata', 'pike', 'queens'] and undercloud_enable_mistral|bool %}
{% include 'inject-ara.sh.j2' %}
{% endif %}
